<template>
  <view class="text-center" :style="{ 'margin-top': marginTop + 'rpx' }">
    <image class="w-48 align-top" :src="src" mode="widthFix"></image>
    <view class="text-sm text-gray mt-7">
      {{ text }}
    </view>
  </view>
</template>

<script>
export default {
  props: {
    mode: {
      type: String,
      default: '',
    },
    text: {
      type: String,
      default: '- 空空如也 -',
    },
    marginTop: {
      type: Number,
      default: 100,
    },
  },
  computed: {
    src() {
      switch (this.mode) {
        // case 'search':
        //   return '/static/images/empty_search.png';
        default:
          return '/static/images/empty_data.png';
      }
    },
  },
};
</script>

<style></style>
